home *** CD-ROM | disk | FTP | other *** search
INI File | 2001-07-11 | 2.3 KB | 121 lines |
- [var_declaration|Variable Declaration]
- var Name|;
- [var_assign|Variable Assignment]
- var Name| = value;
-
- [function|Function]
- function Name|(parameters){
- // add code
- }
-
- [if|if Statement]
- if(condition|){
- // add code if true
- }
- [if_else|if else Statement]
- if(condition|){
- // add code if true
- }else{
- // add code if false
- }
-
- [if_else_if_else|if else if else Statement]
- if(condition|){
- // add code if true
- }else if(condition){
- // add code if true
- }else{
- // add code if false
- }
-
- [conditional_variable|Conditional Variable Assignment]
- var Name| = (condition) ? trueValue : falseValue;
-
- [for_loop_inc|for Loop Increment]
- for(var i = min; i <= max|; i++){
- // add code for increment
- }
-
- [for_loop_dec|for Loop Decrement]
- for(var i = max; i >= min|; i--){
- // add code for decrement
- }
- [for_loop_break|for Loop Break]
- for(var i = min; i >= max|; i++){
- if(condition){
- // add code if true
- break;
- }
- // add code if false
- }
- [while_loop|while Loop]
- while(condition|){
- // add code
- }
- [while_loop_break|while Loop Break]
- while(condition|){
- if(condition){
- // add code
- break;
- }
- // add code if false
- }
- [do_while_loop|do while Loop]
- do{
- // add code
- }while(condition|);
- [with|with Statement]
- with(object|){
- objectProperty1 = value;
- objectProperty2 = value;
- }
-
- [switch_int|switch Integers]
- switch(Integer value|){
- case 0:
- // add code if value is zero
- break;
- case 1:
- // add code if value is one
- break;
- case 2:
- // add code if value is two etc
- break;
- default:
- // add code if value not recognized
- }
- [switch_string|switch Strings]
- switch(String value|){
- case "first string":
- // add code if value is matched
- break;
- case "second string":
- // add code if value is matched
- break;
- case "third string":
- // add code if value is matched etc
- break;
- default:
- // add code if value not recognized
- }
- [array_new|New Array]
- var Name| = new Array();
-
- [array_create|Create an Array]
- var Name| = new Array();
- Name[0] = value1;
- Name[1] = value2;
- Name[2] = value3;
- // etc
-
- [array_compact|Create a Compact Array]
- var Name| = new Array(value1, value2, value3);
-
- [comment|Single Line Comment]
- // add comment here|
- [comment_multi|Multiple Line Comment]
- /*
- add comment lines between asterisks
-
- */
-